package com.zhiwang.planet.di.module

import com.zhiwang.planet.mvvm.viewmodel.withdraw.DetailRepository
import com.zhiwang.planet.mvvm.viewmodel.withdraw.UserDetailRepository
import com.zhiwang.planet.repository.IUserRepository
import com.zhiwang.planet.repository.UserRepository
import com.zhiwang.planet.repository.datasource.UserDataSource
import com.zhiwang.planet.repository.datasource.UserDataSourceImpl
import dagger.Binds
import dagger.Module
import javax.inject.Named

@Module
abstract class BindsModule {

    @Binds
    abstract fun bindUserRepo(userRepo: UserRepository): IUserRepository


    @Binds
    abstract fun bindUserDataSource(userDS: UserDataSourceImpl): UserDataSource


    @Named("user_detail")
    @Binds
    abstract fun bindUserDetailRepo(repo: UserDetailRepository): DetailRepository
}